﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MI.ORM.Repository;
using MI.Entity;

namespace MI.Service
{
    public class CategoryService : ICategoryService
    {
        private readonly IRepository<Category> _categoryRepository;

        public CategoryService(IRepository<Category> categoryRepository)
        {
            this._categoryRepository = categoryRepository;
        }

        public Category GetCategoryByID(int categoryID)
        {
            return _categoryRepository.FindBy(c => c.ID == categoryID);
        }
    }
}
